//
//  BGInventory Cell.m
//  bigMall
//
//  Created by ios on 2016/12/9.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "BGInventoryCell.h"

@implementation BGInventoryCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier inventory:(NSString *)inventory {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self createUI:inventory];
        
    }
    
    return self;
}
- (void)createUI:(NSString *)inventory {
    
    //修饰线
    UIView *v1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 1)];
    v1.backgroundColor = dockwhite_;
    [self.contentView addSubview:v1];
    
    titleLab = [[UILabel alloc] initWithFrame:CGRectMake(21, 10, 46, 21)];
    titleLab.font = [UIFont systemFontOfSize:16];
    [self.contentView addSubview:titleLab];
    
    UITextField *textFiled = [[UITextField alloc] initWithFrame:CGRectMake(titleLab.right + 5, 11, 100, 21)];
    textFiled.font = [UIFont systemFontOfSize:16];
    textFiled.text = inventory;
    textFiled.userInteractionEnabled = NO;
    [self.contentView addSubview:textFiled];
    
}
- (void)setTitleText:(NSString *)titleText {
    _titleText = titleText;
    titleLab.text = [NSString stringWithFormat:@"%@:",titleText];
}
@end
